import { Module } from '@nestjs/common';
import { AccountModule } from './account/account.module';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      // host: '8.129.234.99',
      host: '127.0.0.1',
      port: 3306,
      username: 'root',
      password: 'root',
      database: 'serverless_test',
      synchronize: true, // 自动同步数据模型到数据表中
      logging: true, // 是否打印日志
      entities: [
        __dirname + '/**/*.entity{.ts,.js}'],
    }),
    AccountModule
  ],
  controllers: [],
  providers: [],
})
export class AppModule {}
